// =======================================================================
// 
//       Filename:  syntaxerror.hpp
// 
//    Description:  
// 
//        Version:  1.0
//        Created:  27.03.2010 16:35:50
//       Revision:  none
//       Compiler:  g++
// 
//         Author:  Dominik 'domachine' Burgdörfer (-), dominik.burgdoerfer@googlemail.com
//        Company:  -
// 
// =======================================================================


#ifndef  SYNTAXERROR_INC
#define  SYNTAXERROR_INC
#include "parsingerror.hpp"
#include <stdexcept>

namespace webplodder {
    namespace exceptions {
        /**
         * @brief Exception thrown by the parser if
         * a syntax error occurs.
         */
        class SyntaxError : public ParsingError {
            public:
                /**
                 * @brief Constructs SyntaxError instance.
                 * @param what The error message
                 * @param line The line number where the error occured
                 */
                SyntaxError(const std::string& what, 
                        int line,
                        const boost::filesystem::path& file);

                /**
                 * @brief Returns the line number where the error occured.
                 */
                int line() const;

            private:
                int mLine;
        };
    }
}
#endif   // ----- #ifndef SYNTAXERROR_INC  -----
